﻿@using BonjourQuotation.UI.Models.AccountModel
@model ToolViewModel
<script type="text/javascript">
    function GetAllGrid() {
        if ($("#AllGridCopy").length > 0) {
            $("#AllGridCopy").remove();
        }
        var table = $('<table></table>');
        $("#ToolTabColumnPermissionsGridDiv").append("<div id='AllGridCopy' style='Display:None'></div>");
        $("#ToolTabColumnPermissionsGridDiv .LineNo").each(function () {
            var columntr = $("<tr style='border: 1px solid black;border-collapse: collapse'></tr>");
            var rowLineNo = $("<td style='border: 1px solid black;border-collapse: collapse'></td>").html($(this).val());
            columntr.append(rowLineNo)
            var ToolTabColumnNameParent = $(this).parent().parent();
            var ToolTabColumnName = $("<td style='border: 1px solid black;border-collapse: collapse'></td>").html($("option:selected", ToolTabColumnNameParent.find(".LineNoChangeDrop")).text());
            columntr.append(ToolTabColumnName)
            table.append(columntr);
        });
        $('#AllGridCopy').append(table);
    }
    $(document).on("copy", "#CopyAll", function (e) {
        GetAllGrid();
        var table = $("#AllGridCopy");
        e.clipboardData.clearData();
        e.clipboardData.setData("text/html", table.html());
        e.preventDefault();
        $("#AllGridCopy").remove();
    });
</script>

@Html.HiddenFor(model => model.UserID)
<div class="pull-right">
    <div class="row form-row">
        <div class=" col-lg-4">
            <div class="input-group">
                <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.UserName)</span>
                @Html.LabelForModel(Model.UserName, new { @class = "table_inputs_SmallPadding2 inpputgr form-control" })
            </div>
        </div>
        <div class=" col-lg-5">
            <div class="input-group">
                <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.Profile)</span>
                @Html.DropDownListFor(model => model.SelectedProfile, new SelectList(Model.Profile, "Value", "Text"), new { @class = "table_inputs_SmallPadding2 inpputgr form-control" })
            </div>
        </div>
        <div class=" col-lg-3">
            <div class="input-group" @((Model.Profile.Count > 0) ? null : new { @style = "Display:None" })>
                <button class="btn14 btn50" type="button" id="ProfileApplyBtn">Apply</button>
            </div>
        </div>
    </div>
    <div class="row form-row">
        <div class=" col-lg-6">
            <div class="input-group">
                <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.Tool)</span>
                @Html.DropDownListFor(model => model.SelectedTool, new SelectList(Model.Tool, "Value", "Text"), "Select", new { @class = "table_inputs_SmallPadding2 inpputgr form-control ToolDrop" })
            </div>
        </div>
        <div class=" col-lg-6" style="display:none" id="tooltabdrop">
            <div class="input-group">
                <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.ToolTab)</span>
                @Html.DropDownListFor(model => model.SelectedToolTab, new SelectList(Model.ToolTab, "Value", "Text"), "Select", new { @class = "table_inputs_SmallPadding2 inpputgr form-control ToolTabDrop" })
            </div>
        </div>
    </div>
</div>
<div id="ToolTabColumnPermissionsGridDiv" style="display:none;"></div>




